package de.yvert.jingle.impl.openexr;

import java.io.IOException;

public class FloatAttribute extends Attribute
{

public static final String TYPE = "float";
public static final int SIZE = 4;

private final float value;

public FloatAttribute(String name, float value)
{
	super(name);
	this.value = value;
}

@Override
public String toString()
{ return TYPE+" \""+getName()+"\" = "+value; }

@Override
public void write(ExrOutputStream out) throws IOException
{
	out.writeString(getName());
	out.writeString(TYPE);
	out.writeInt(SIZE);
	out.writeFloat(value);
}

}
